package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiD_month_profit;

//DAO
public interface D_month_profitMapperBase {

	// 根据id查看
	@Select("SELECT * FROM d_month_profit  WHERE MPROFITID = #{mprofitid}")
	public ApiD_month_profit findD_month_profitById(Integer mprofitid);

	// 查看数据集
	@Select("SELECT * FROM D_month_profit")
	public List<ApiD_month_profit> findD_month_profits();

	// 根据条件查看数据集
	public List<Map<String, Object>> findD_month_profitsByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO d_month_profit (MONTH, USER_ID, MONEY, STATUS, HANDLE_TIME) VALUES (#{month}, #{user_id}, #{money}, #{status}, #{handle_time})")
	@Options(useGeneratedKeys = true, keyProperty = "mprofitid")
	public int insertD_month_profit(ApiD_month_profit d_month_profit);

	// 修改
	@Update("UPDATE d_month_profit SET MONTH = #{month}, USER_ID = #{user_id}, MONEY = #{money}, STATUS = #{status}, HANDLE_TIME = #{handle_time} WHERE MPROFITID = #{mprofitid}")
	public int updateD_month_profit(ApiD_month_profit d_month_profit);

	// 删除
	@Delete("DELETE FROM d_month_profit  WHERE MPROFITID = #{mprofitid}")
	public int deleteD_month_profit(Integer mprofitid);

	// Foreign keys revelant

	// region Indexs revelant

}
